﻿<%@ WebHandler Language="C#" Class="SetRight" %>

using System;
using System.Collections;
using System.Data;
using System.Web;
using BLL;
public class SetRight : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        string id, userid;
        id = context.Request.Params["Nid"].Trim();
        userid = context.Request.Params["Uid"].Trim();

        Hashtable hs = new Hashtable();
        hs.Add("[Right]", id.Substring(1));
        if (new PublicSqlService().Update(hs, "Tbl_AdminLoginUser", "ID=" + userid))
        {
            context.Response.Write("ok");
        }
        else
        {
            context.Response.Write("保存失败");
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}